<html>
<head><meta charset="utf-8"><title>proc-macro not expanded · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/proc-macro.20not.20expanded.html">proc-macro not expanded</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220135201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/proc-macro%20not%20expanded/near/220135201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Martin Asquino <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/proc-macro.20not.20expanded.html#220135201">(Dec 16 2020 at 16:11)</a>:</h4>
<p>Hey all! I'm getting a lot of <code>proc-macro not expanded</code> warnings from rust-analyzer and they seem to be specifically in the derives for serde in my case. <code>#[derive(Serialize, Deserialize)]</code> those trigger that warning. I thought that maye meant that I had that derive added but I never really used it (as in, never serialized or deserialized it), but that doesn't seem to be the case. I must be missing something, but I can't understand what.</p>



<a name="220135478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/proc-macro%20not%20expanded/near/220135478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/proc-macro.20not.20expanded.html#220135478">(Dec 16 2020 at 16:12)</a>:</h4>
<p>do you have the <code>rust-analyzer.procMacro.enable</code> and <code>rust-analyzer.cargo.loadOutDirsFromCheck</code> settings enabled?</p>



<a name="220135983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/proc-macro%20not%20expanded/near/220135983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/proc-macro.20not.20expanded.html#220135983">(Dec 16 2020 at 16:14)</a>:</h4>
<p>It means that rust-analyzer was not able to expand the procedural macro because it wasn't found. This is usually a benign diagnostic and can be ignored if you have not enabled procedural macro support (hence being only a "hint", not a warning).</p>



<a name="220136106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/proc-macro%20not%20expanded/near/220136106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Martin Asquino <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/proc-macro.20not.20expanded.html#220136106">(Dec 16 2020 at 16:15)</a>:</h4>
<p>I only have <code>rust-analyzer.diagnostics.disable = ["proc-macro"]</code> because it also seemed to add a bunch of errors that I couldn't make sense of, but that's all I have in terms of rust-analyzer settings.</p>



<a name="220141263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/proc-macro%20not%20expanded/near/220141263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/proc-macro.20not.20expanded.html#220141263">(Dec 16 2020 at 16:54)</a>:</h4>
<p>That diagnostic code does not exist, did you mean <code>"macro-error"</code>?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>